package com.zzxy.spring.aspect;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;

public class MyAspectAop implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("before...");
        Object obj = methodInvocation.proceed();
        System.out.println("after...");
        return obj;
    }


    public void myBefore(JoinPoint joinPoint) throws Throwable {
    }
    public  void myAfterReturning(JoinPoint jp,Object ret){
    }
    public  void  myThrowable(JoinPoint jp,Throwable e){
    }
    public Object  myAround(ProceedingJoinPoint pjp) throws Throwable{
        return null;
    }
    public  void myAfter(JoinPoint jp){
    }
}
